-- GENERATED SPELL FOR [Coilskar Sea-Caller] --


function spell0_22875(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(40088,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22875', 2000, 1)
end

function spell1_22875(pUnit, Event) --@Hurricane,n/a--
pUnit:FullCastSpellOnTarget(40090,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22875', 20000, 1)
end

function spell2_22875(pUnit, Event) --@Summon Geyser,n/a--
pUnit:FullCastSpellOnTarget(40091,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22875', 6000, 1)
end

function Sorts_22875(pUnit, Event)
local choix_sorts_22875 = math.random(0, 2)
if choix_sorts_22875 == 0 then
pUnit:RegisterEvent('spell0_22875', 1, 1)
end
if choix_sorts_22875 == 1 then
pUnit:RegisterEvent('spell1_22875', 1, 1)
end
if choix_sorts_22875 == 2 then
pUnit:RegisterEvent('spell2_22875', 1, 1)
end
end

function mob22875_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22875', math.random(1500, 3000), 1)
end

function mob22875_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22875_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22875_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22875, 1, 'mob22875_Action')
RegisterUnitEvent(22875, 2, 'mob22875_Leave')
RegisterUnitEvent(22875, 3, 'mob22875_Kill')
RegisterUnitEvent(22875, 4, 'mob22875_Die')
